/*
 * @Author: your name
 * @Date: 2020-12-27 12:48:22
 * @LastEditTime: 2021-03-18 18:30:22
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \white-jotter-blog-vue\vue.config.js
 */
module.exports = {
  configureWebpack: {
    resolve: {
      alias: {
        assets: "@/assets",
        common: "@/common",
        components: "@/components",
        network: "@/network",
        views: "@/views",
        router: "@/router",
        common: "@/common",
        mixins: "@/mixins",
        lib: "@/lib",
        utils: "@/utils"
      },
    },
  },
  devServer: {
    open: true, //是否自动弹出浏览器页面
    host: "localhost",
    port: 9888,
    https: false,
    hotOnly: true,
    proxy: {
      "/api": {
        target: "http://localhost:8111/api", //API服务器的地址
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "^/api": "",
        },
      },
    },
  },
};